<?php 

	namespace Admin\Model;
	use Think\Model;

	class AttrNameModel extends Model {
		protected $trueTableName = 'typ_attr';
    	
    	    public $_validate = array(
    // //     //  array(验证字段1,验证规则,错误提示,[验证条件,附加规则,验证时间]),
       array('attr_name','','属性名已经存在！',0,'unique',1),
  
    );

        protected $_link = array(
                'AttrVal' => array(
                'mapping_type' => self::HAS_MANY,
                'class_name' => 'AttrVal',
                'foreign_key' => 'attr_id',
                'mapping_name' => 'attibutValue',
                
                // 定义更多的关联属性
                
),);

    	

}

?>